#pragma once
#include <iostream>
#include <pthread.h>

using namespace std;

class Hungry_Mode // 饿汉模式
{
public:
    ~Hungry_Mode()
    {
        cout << "~Hungry_Mode" << endl;
    }

    static Hungry_Mode* GetInstance()
    {
        return &Ins;
    }

private:
    Hungry_Mode()
    {
        cout << "Hungry_Mode" << endl;
    }

    Hungry_Mode(const Hungry_Mode& ins) = delete;
    Hungry_Mode& operator=(const Hungry_Mode& ins) = delete;

private:
    static Hungry_Mode Ins;
};

Hungry_Mode Hungry_Mode::Ins;

